package com.elitesland.org.repo;

import com.elitesland.org.entity.EmployeeTagDO;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.querydsl.QuerydslPredicateExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Optional;

@Repository
public interface EmployeeTagRepo extends JpaRepository<EmployeeTagDO, Long>, QuerydslPredicateExecutor<EmployeeTagDO> {

    Optional<EmployeeTagDO> findByTagName(String tagName);

    List<EmployeeTagDO> findAllByTagNameIn(List<String> tagNames);

    Optional<EmployeeTagDO> findByIdNotAndTagName(Long id, String tagName);

    void deleteAllByIdIn(List<Long> ids);
}
